<template>
    <view class="flex-center w-[80rpx] h-[80rpx] bg-[#00000066] rounded-full fixed top-[10rpx] left-[10rpx] z-10" @click="goBack">
        <IconFont name="rect-left" size="24" color="#fff" />
    </view>
</template>

<script setup>
import Taro from '@tarojs/taro'
import { IconFont } from '@nutui/icons-vue-taro'
const props = defineProps({
    back: {
        type: Function,
        // default: () => {}
    }
})

const goBack = () => {
    // Taro.navigateBack()
    console.log("goBack",props.back)
    if(props.back){
        props.back()
    }
    else{
        // history.back()
        window.history.back()
        // Taro.navigateBack()
    }
}
</script>